package retention_person

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CasRetentionPersonsRouter struct{}

// InitCasRetentionPersonsRouter 初始化 casRetentionPersons表 路由信息
func (s *CasRetentionPersonsRouter) InitCasRetentionPersonsRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	casRetentionPersonsRouter := Router.Group("casRetentionPersons").Use(middleware.OperationRecord())
	casRetentionPersonsRouterWithoutRecord := Router.Group("casRetentionPersons")
	casRetentionPersonsRouterWithoutAuth := PublicRouter.Group("casRetentionPersons")
	{
		casRetentionPersonsRouter.POST("createCasRetentionPersons", casRetentionPersonsApi.CreateCasRetentionPersons)             // 新建casRetentionPersons表
		casRetentionPersonsRouter.DELETE("deleteCasRetentionPersons", casRetentionPersonsApi.DeleteCasRetentionPersons)           // 删除casRetentionPersons表
		casRetentionPersonsRouter.DELETE("deleteCasRetentionPersonsByIds", casRetentionPersonsApi.DeleteCasRetentionPersonsByIds) // 批量删除casRetentionPersons表
		casRetentionPersonsRouter.PUT("updateCasRetentionPersons", casRetentionPersonsApi.UpdateCasRetentionPersons)              // 更新casRetentionPersons表
	}
	{
		casRetentionPersonsRouterWithoutRecord.GET("findCasRetentionPersons", casRetentionPersonsApi.FindCasRetentionPersons)       // 根据ID获取casRetentionPersons表
		casRetentionPersonsRouterWithoutRecord.GET("getCasRetentionPersonsList", casRetentionPersonsApi.GetCasRetentionPersonsList) // 获取casRetentionPersons表列表
		casRetentionPersonsRouterWithoutRecord.GET("generateRetentionPersonExcel", casRetentionPersonsApi.GenerateExcel)            // 生成excel
	}
	{
		casRetentionPersonsRouterWithoutAuth.GET("getCasRetentionPersonsPublic", casRetentionPersonsApi.GetCasRetentionPersonsPublic) // casRetentionPersons表开放接口
	}
}
